package com.smart.campus.controller;

import com.smart.campus.dto.ShAttendanceDetails;
import com.smart.campus.interfaces.ShAttendanceDetailsApi;
import com.smart.campus.pojo.PagedResponse;
import com.smart.campus.service.ShAttendanceDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: smart-campus
 * @BelongsPackage: com.smart.campus.controller
 * @Author: 戴冰洁
 * @CreateTime: 2024-10-07  19:44
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
public class ShAttendanceDetailsController implements ShAttendanceDetailsApi {
    @Autowired
    private ShAttendanceDetailsService shAttendanceDetailsService;

    @Override
    public List<ShAttendanceDetails> findattendlist() {
        return shAttendanceDetailsService.findattendlist();
    }

    @Override
    public void addattend(ShAttendanceDetails shAttendanceDetails) {
        shAttendanceDetailsService.addattend(shAttendanceDetails);
    }

    @Override
    public void daleteattend(Integer id) {
        shAttendanceDetailsService.daleteattend(id);
    }

    @Override
    public PagedResponse<ShAttendanceDetails> attendById(ShAttendanceDetails shAttendanceDetails, Integer pageSum, Integer pageSize) {
        return shAttendanceDetailsService.attendById(shAttendanceDetails,pageSum,pageSize);
    }

    @Override
    public ShAttendanceDetails attenList(Integer id) {
        return shAttendanceDetailsService.attenList(id);
    }

    @Override
    public void updateattend(ShAttendanceDetails shAttendanceDetails) {
        shAttendanceDetailsService.updateattend(shAttendanceDetails);
    }
}
